package com.rui.adapter.obj.Object;

import com.rui.adapter.obj.AC220;
import com.rui.adapter.obj.AC360;
import com.rui.adapter.obj.Power;
import lombok.AllArgsConstructor;

@AllArgsConstructor
public class DC5PowerAdapter implements DC5 {

    // 适配者
    private Power power;

    @Override
    public int output5() {

        int output = power.output();
        if (power instanceof AC360) {
            return output / 72;
        }

        if (power instanceof AC220) {
            return output / 44;
        }
        return 0;
    }
}